package tut.collection.dataStructure.compareableVsComparator;

import java.util.Arrays;


public class CompareableTest {

	public static void main(String[] args){
		Abs [] data = new Abs[5];
		data[0] = new Abs(-2);
		data[1] = new Abs(-1);
		data[2] = new Abs(3);
		data[3] = new Abs(2);
		data[4] = new Abs(-6);
		Arrays.sort(data);
		System.out.println(data.length);

		for (int i = 0; i < data.length; i++) {
			Abs abs = data[i];
			System.out.println(abs.a);
		}
	}
}

